package 图书系统.user.book;

public class BookList {
    /*
    属性
     */
    private Book[]arr=new Book[10];//最多放十本书
    private int count;//实时记录有几本书
    /*
    刚开始创建书架，先放三本书
     */
    public BookList() {
        this.arr[0]=new Book("三国演义","罗贯中",12.5,"小说");
        this.arr[1]=new Book("西游记","吴承恩",7.5,"小说");
        this.arr[2]=new Book("红楼梦","曹雪芹",92.4,"小说");
        count=3;
    }
    /*
    对书籍里的内容进行操作
     */
    public Book getArr(int tmp) {
        return arr[tmp];
    }
    public void setArr(int tmp,Book book) {
        this.arr[tmp] = book;
    }

    /*
    获取实时的书本数量
     */
    public int getCount() {
        return count;
    }
    /*
    修改书本数量
     */

    public void setCount(int count) {
        this.count = count;
    }
    //实现书籍的功能，我们放在一个包里
}
